Skip to content

Ruby: Improve native extension loading for preview versions#1081

Merged
marcoroth merged 3 commits into
mainfrom
ruby-preview-versions
Jan 18, 2026
Merged

Ruby: Improve native extension loading for preview versions#1081
marcoroth merged 3 commits into
mainfrom
ruby-preview-versions

Conversation

@marcoroth

@marcoroth marcoroth commented Jan 18, 2026

Copy link
Copy Markdown
Owner

This pull request improves how the herb gem loads its native extension, particularly for users running preview/development versions of Ruby.

  1. Detect preview Ruby versions (RUBY_PATCHLEVEL == -1) and skip precompiled extensions to avoid ABI incompatibility errors like undefined symbol: ruby_abi_version

  2. Add helpful error messages when the native extension fails to load, including:

    • What paths were tried
    • Common causes (preview Ruby, missing compilation, missing build tools)
    • How to reinstall with source compilation
    • Platform-specific instructions for installing C compilers
  3. Remove unnecessary rake templates call from extconf.rb since generated files are already bundled in the gem

Resolves #880
Resolves #951
Resolves #1046

@pkg-pr-new

pkg-pr-new Bot commented Jan 18, 2026

Copy link
Copy Markdown
npx https://pkg.pr.new/@herb-tools/formatter@1081
npx https://pkg.pr.new/@herb-tools/language-server@1081
npx https://pkg.pr.new/@herb-tools/linter@1081

commit: 6e125bb

@github-actions

github-actions Bot commented Jan 18, 2026

Copy link
Copy Markdown

🌿 Interactive Playground and Documentation Preview

A preview deployment has been built for this pull request. Try out the changes live in the interactive playground:


🌱 Grown from commit 6e125bb


✅ Preview deployment has been cleaned up.

@marcoroth marcoroth merged commit 6f8370a into main Jan 18, 2026
32 checks passed
@marcoroth marcoroth deleted the ruby-preview-versions branch January 18, 2026 01:53
@marcoroth marcoroth added this to the v1.0.0 milestone Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

herb-0.8.7-x86_64-linux-gnu/lib/herb/4.0/herb.so: undefined symbol: ruby_abi_version Bug: cannot load such file lib/herb/herb

1 participant